package cn.ycl.system.other.study.designMode.combination;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author YuanChangLiang
 * @description
 * @date created in 16:55 2021/5/31
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public abstract class Component {
    //职位
    private String position;
    //工作内容
    private String job;

    //做自己的本职工作
    public void work(){
        System.out.println("我是" + position + "，我正在" + job);
    }
    //管理职员或管理者
    abstract void addComponent(Component component);
}
